'use strict';
const path = require("path")
module.exports = appInfo => {
  const config = exports = {
    security: {
      csrf: {
        enable: false
      }
    },
    mysql:{
      client:{
        host:'localhost',
        port:'3306',
        user:'root',
        password:'root',
        database:'chunling'
      },
      app:true,
      agent:false
    },
    static:{
      prefix: '/',
      dir: path.join(appInfo.baseDir, 'app/public/')
    },
    view:{
      root: [
        path.join(appInfo.baseDir, 'app/view')
      ].join(','),
      cache: false,
      defaultExtension: '.html',
      defaultViewEngine: 'nunjucks',
      mapping: {}
    }
  };

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1538982820866_6020';

  // add your config here
  config.middleware = [];

  return config;
};
